├── Project1.res ├── oauth ├── br.com.factorysolution.oauth.pas └── br.com.factorysolution.oauthparams.pas ├── abstract └── br.com.factorysolution.abstract.pas ├── README.md ├── Project1.identcache ├── Project1.dpr ├── factory └── br.com.factorysolution.factoryparams.pas ├── Token.pas ├── interfaces └── br.com.factorysolution.interfaces.pas ├── basic ├── br.com.factorysolution.basicparams.pas └── br.com.factorysolution.basicrest.pas ├── Pessoa.pas ├── Project1.dproj.local ├── uMain.dfm ├── uMain.pas └── Project1.dproj /Project1.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FactorySolution/Meetup_Delphi_Rest_API/HEAD/Project1.res -------------------------------------------------------------------------------- /oauth/br.com.factorysolution.oauth.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FactorySolution/Meetup_Delphi_Rest_API/HEAD/oauth/br.com.factorysolution.oauth.pas -------------------------------------------------------------------------------- /abstract/br.com.factorysolution.abstract.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FactorySolution/Meetup_Delphi_Rest_API/HEAD/abstract/br.com.factorysolution.abstract.pas -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Código fonte do Meetup de Comunicação Rest API com Delphi 2 | 3 | - Para utilizar o código fonte é necessário baixar o repositório https://github.com/paolo-rossi/delphi-jose-jwt 4 | 5 | # API Rest desenvolvida em Java utilizando Spring 6 | 7 | > O serviço REST se encontra neste repositório https://github.com/FactorySolution/FactoryMoneyApi 8 | 9 | > Para utilizar Basic Auth ou OAuth2 altere a propriedade [spring.profiles.active] que se localiza no arquivo application.properties 10 | 11 | > Importe o projeto no STS ou Intellij, não é necessário Tomcat, o mesmo já vem embarcado no Spring 12 | 13 | > A api utiliza o banco de dados MySql 14 | -------------------------------------------------------------------------------- /Project1.identcache: -------------------------------------------------------------------------------- 1 | 2 | .C:\Users\Andre\Desktop\DelphiInga\Project1.dprNC:\Users\Andre\Desktop\DelphiInga\oauth\br.com.factorysolution.oauthparams.pas,C:\Users\Andre\Desktop\DelphiInga\Pessoa.pasLC:\Users\Andre\Desktop\DelphiInga\basic\br.com.factorysolution.basicrest.pas+C:\Users\Andre\Desktop\DelphiInga\uMain.pasHC:\Users\Andre\Desktop\DelphiInga\oauth\br.com.factorysolution.oauth.pasRC:\Users\Andre\Desktop\DelphiInga\interfaces\br.com.factorysolution.interfaces.pas+C:\Users\Andre\Desktop\DelphiInga\Token.pasNC:\Users\Andre\Desktop\DelphiInga\abstract\br.com.factorysolution.abstract.pasNC:\Users\Andre\Desktop\DelphiInga\basic\br.com.factorysolution.basicparams.pas -------------------------------------------------------------------------------- /Project1.dpr: -------------------------------------------------------------------------------- 1 | program Project1; 2 | 3 | uses 4 | Vcl.Forms, 5 | uMain in 'uMain.pas' {Form1}, 6 | Token in 'Token.pas', 7 | Pessoa in 'Pessoa.pas', 8 | br.com.factorysolution.interfaces in 'interfaces\br.com.factorysolution.interfaces.pas', 9 | br.com.factorysolution.basicparams in 'basic\br.com.factorysolution.basicparams.pas', 10 | br.com.factorysolution.basicrest in 'basic\br.com.factorysolution.basicrest.pas', 11 | br.com.factorysolution.abstract in 'abstract\br.com.factorysolution.abstract.pas', 12 | br.com.factorysolution.oauth in 'oauth\br.com.factorysolution.oauth.pas', 13 | br.com.factorysolution.oauthparams in 'oauth\br.com.factorysolution.oauthparams.pas'; 14 | 15 | {$R *.res} 16 | 17 | begin 18 | //ReportMemoryLeaksOnShutdown := true; 19 | Application.Initialize; 20 | Application.MainFormOnTaskbar := True; 21 | Application.CreateForm(TForm1, Form1); 22 | Application.Run; 23 | end. 24 | -------------------------------------------------------------------------------- /factory/br.com.factorysolution.factoryparams.pas: -------------------------------------------------------------------------------- 1 | unit br.com.factorysolution.factoryparams; 2 | 3 | interface 4 | 5 | uses 6 | br.com.factorysolution.interfaces; 7 | 8 | type 9 | TParams = class(TInterfacedObject, IFactoryParams) 10 | private 11 | FParams: IParams; 12 | public 13 | function Basic: IParamsBasic; 14 | function OAuth: IParamsOAuth; 15 | 16 | class function New(const AParams: IParams): IFactoryParams; 17 | constructor Create(const AParams: IParams); 18 | destructor Destroy; override; 19 | 20 | end; 21 | 22 | 23 | implementation 24 | 25 | { TParams } 26 | 27 | function TParams.Basic: IParamsBasic; 28 | begin 29 | 30 | end; 31 | 32 | constructor TParams.Create(const AParams: IParams); 33 | begin 34 | 35 | end; 36 | 37 | destructor TParams.Destroy; 38 | begin 39 | 40 | inherited; 41 | end; 42 | 43 | class function TParams.New(const AParams: IParams): IFactoryParams; 44 | begin 45 | 46 | end; 47 | 48 | function TParams.OAuth: IParamsOAuth; 49 | begin 50 | 51 | end; 52 | 53 | end. 54 | -------------------------------------------------------------------------------- /Token.pas: -------------------------------------------------------------------------------- 1 | unit Token; 2 | 3 | interface 4 | 5 | uses Generics.Collections, Rest.Json; 6 | 7 | type 8 | TToken = class 9 | private 10 | FAuthorities: TArray; 11 | FClient_Id: string; 12 | FExp: Integer; 13 | FJti: string; 14 | FNome: string; 15 | FScope: TArray; 16 | FUser_Name: string; 17 | public 18 | function ToJsonString: string; 19 | class function FromJsonString(const AValue: string): TToken; 20 | published 21 | property Authorities: TArray read FAuthorities write FAuthorities; 22 | property Client_Id: string read FClient_Id write FClient_Id; 23 | property Exp: Integer read FExp write FExp; 24 | property Jti: string read FJti write FJti; 25 | property Nome: string read FNome write FNome; 26 | property Scope: TArray read FScope write FScope; 27 | property User_Name: string read FUser_Name write FUser_Name; 28 | end; 29 | 30 | implementation 31 | 32 | { TToken } 33 | 34 | class function TToken.FromJsonString(const AValue: string): TToken; 35 | begin 36 | result := TJson.JsonToObject(AValue); 37 | end; 38 | 39 | function TToken.ToJsonString: string; 40 | begin 41 | Result := TJson.ObjectToJsonString(self); 42 | end; 43 | 44 | end. 45 | -------------------------------------------------------------------------------- /interfaces/br.com.factorysolution.interfaces.pas: -------------------------------------------------------------------------------- 1 | unit br.com.factorysolution.interfaces; 2 | 3 | interface 4 | 5 | uses 6 | System.Generics.Collections, Vcl.StdCtrls, Token; 7 | 8 | type 9 | IParams = interface 10 | ['{4CA08E97-EB6A-4D5C-9651-4F212D65CB65}'] 11 | function SetLogin(const AValue: string): IParams; 12 | function SetPassword(const AValue: string): IParams; 13 | function SetUrl(const AValue: string): IParams; 14 | function GetLogin: string; 15 | function GetPassword: string; 16 | function GetUrl: string; 17 | end; 18 | 19 | IParamsBasic = interface(IParams) 20 | ['{BF9D4B6B-8D3B-414C-8ED0-16727F4B0680}'] 21 | end; 22 | 23 | IParamsOAuth = interface(IParams) 24 | ['{458D749A-EF0E-4FD7-BE4C-87939E7879DF}'] 25 | function SetClientID(const AValue: string) : IParamsOAuth; 26 | function SetClientSecret(const AValue: string) : IParamsOAuth; 27 | function SetSecretKey(const AValue: string) : IParamsOAuth; 28 | function GetClientID : string; 29 | function GetClientSecret: string; 30 | function GetSecretKey: string; 31 | end; 32 | 33 | IRest = interface 34 | ['{61105668-021C-4160-9E1A-C56B7132EC88}'] 35 | function Get(const AContext: string): T; overload; 36 | function Get(const AContext, AID: string): T; overload; 37 | function Post(const AContext: string; AObject: T): T; 38 | function Put(const AContext: string; AObject: T): T; 39 | procedure Delete(const AContext: string; AID: Integer); 40 | end; 41 | 42 | IRestOAuth = interface(IRest) 43 | ['{9E754C3A-3813-4DD0-95EB-2077DB44DCFF}'] 44 | function GetToken: string; 45 | function ValidateToken(AToken: string): TToken; 46 | end; 47 | 48 | 49 | implementation 50 | 51 | end. 52 | -------------------------------------------------------------------------------- /basic/br.com.factorysolution.basicparams.pas: -------------------------------------------------------------------------------- 1 | unit br.com.factorysolution.basicparams; 2 | 3 | interface 4 | 5 | uses 6 | br.com.factorysolution.interfaces; 7 | 8 | type 9 | TBaseParams = class(TInterfacedObject, IParamsBasic, IParams) 10 | private 11 | FLogin: string; 12 | FPassword: string; 13 | FUrl: string; 14 | public 15 | function SetLogin(const AValue: string): IParams; 16 | function SetPassword(const AValue: string): IParams; 17 | function SetUrl(const AValue: string): IParams; 18 | function GetLogin: string; 19 | function GetPassword: string; 20 | function GetUrl: string; 21 | 22 | class function New: IParamsBasic; 23 | constructor Create; 24 | destructor Destroy; override; 25 | 26 | end; 27 | 28 | implementation 29 | 30 | { TBaseParams } 31 | 32 | constructor TBaseParams.Create; 33 | begin 34 | 35 | end; 36 | 37 | destructor TBaseParams.Destroy; 38 | begin 39 | 40 | inherited; 41 | end; 42 | 43 | function TBaseParams.GetLogin: string; 44 | begin 45 | Result := FLogin; 46 | end; 47 | 48 | function TBaseParams.GetPassword: string; 49 | begin 50 | Result := FPassword; 51 | end; 52 | 53 | function TBaseParams.GetUrl: string; 54 | begin 55 | Result := FUrl; 56 | end; 57 | 58 | class function TBaseParams.New: IParamsBasic; 59 | begin 60 | Result := Self.Create; 61 | end; 62 | 63 | function TBaseParams.SetLogin(const AValue: string): IParams; 64 | begin 65 | Result := Self; 66 | FLogin := AValue; 67 | end; 68 | 69 | function TBaseParams.SetPassword(const AValue: string): IParams; 70 | begin 71 | Result := Self; 72 | FPassword := AValue; 73 | end; 74 | 75 | function TBaseParams.SetUrl(const AValue: string): IParams; 76 | begin 77 | Result := Self; 78 | FUrl := AValue; 79 | end; 80 | 81 | end. 82 | -------------------------------------------------------------------------------- /basic/br.com.factorysolution.basicrest.pas: -------------------------------------------------------------------------------- 1 | unit br.com.factorysolution.basicrest; 2 | 3 | interface 4 | 5 | uses 6 | br.com.factorysolution.interfaces, 7 | System.Generics.Collections, 8 | br.com.factorysolution.abstract; 9 | 10 | type 11 | TBasicRest = class(TAbstractAPi, IRest) 12 | private 13 | FParams: IParams; 14 | public 15 | function Get(const AContext: string): T; overload; 16 | function Get(const AContext, AID: string): T; overload; 17 | 18 | function Post(const AContext: string; AObject: T): T; 19 | function Put(const AContext: string; AObject: T): T; 20 | procedure Delete(const AContext: string; AID: Integer); 21 | 22 | class function New(const Params: Iparams): IRest; 23 | constructor Create(const Params: Iparams); 24 | destructor Destroy; override; 25 | end; 26 | 27 | implementation 28 | 29 | uses 30 | Pessoa, 31 | REST.Json, 32 | System.SysUtils; 33 | 34 | { TBasicRest } 35 | 36 | constructor TBasicRest.Create(const Params: Iparams); 37 | begin 38 | Configure(Params, taBasic); 39 | end; 40 | 41 | procedure TBasicRest.Delete(const AContext: string; AID: Integer); 42 | begin 43 | ExecuteDelete(AContext + '/' + AID.ToString); 44 | end; 45 | 46 | destructor TBasicRest.Destroy; 47 | begin 48 | inherited; 49 | end; 50 | 51 | {$Region GET} 52 | function TBasicRest.Get(const AContext, AID: string): T; 53 | begin 54 | Result := Execute(AContext + '/' + AID); 55 | end; 56 | 57 | function TBasicRest.Get(const AContext: string): T; 58 | begin 59 | Result := Execute(AContext); 60 | end; 61 | {$EndRegion} 62 | 63 | class function TBasicRest.New(const Params: Iparams): IRest; 64 | begin 65 | Result := Self.Create(Params); 66 | end; 67 | 68 | function TBasicRest.Post(const AContext: string; AObject: T): T; 69 | begin 70 | Result := Execute(AContext, AObject, tmPost); 71 | end; 72 | 73 | function TBasicRest.Put(const AContext: string; AObject: T): T; 74 | begin 75 | Result := Execute(AContext, AObject, tmUpdate); 76 | end; 77 | 78 | end. 79 | -------------------------------------------------------------------------------- /oauth/br.com.factorysolution.oauthparams.pas: -------------------------------------------------------------------------------- 1 | unit br.com.factorysolution.oauthparams; 2 | 3 | interface 4 | 5 | uses 6 | br.com.factorysolution.interfaces; 7 | 8 | type 9 | TOAuthParams = class(TInterfacedObject, IParamsOAuth, IParams) 10 | private 11 | FLogin: string; 12 | FPassword: string; 13 | FUrl: string; 14 | FClientID: string; 15 | FClientSecret: string; 16 | FSecretKey: string; 17 | public 18 | function GetLogin: string; 19 | function GetPassword: string; 20 | function GetUrl: string; 21 | function GetClientID: string; 22 | function GetClientSecret: string; 23 | function GetSecretKey: string; 24 | function SetLogin(const AValue: string): IParams; 25 | function SetPassword(const AValue: string): IParams; 26 | function SetUrl(const AValue: string): IParams; 27 | function SetClientID(const AValue: string): IParamsOAuth; 28 | function SetClientSecret(const AValue: string): IParamsOAuth; 29 | function SetSecretKey(const AValue: string): IParamsOAuth; 30 | 31 | class function New: IParamsOAuth; 32 | constructor Create; 33 | destructor Destroy; override; 34 | end; 35 | 36 | implementation 37 | 38 | { TOAuthParams } 39 | 40 | constructor TOAuthParams.Create; 41 | begin 42 | 43 | end; 44 | 45 | destructor TOAuthParams.Destroy; 46 | begin 47 | 48 | inherited; 49 | end; 50 | 51 | function TOAuthParams.GetClientID: string; 52 | begin 53 | Result := FClientID; 54 | end; 55 | 56 | function TOAuthParams.GetClientSecret: string; 57 | begin 58 | Result := FClientSecret; 59 | end; 60 | 61 | function TOAuthParams.GetLogin: string; 62 | begin 63 | Result := FLogin; 64 | end; 65 | 66 | function TOAuthParams.GetPassword: string; 67 | begin 68 | Result := FPassword; 69 | end; 70 | 71 | function TOAuthParams.GetSecretKey: string; 72 | begin 73 | Result := FSecretKey; 74 | end; 75 | 76 | function TOAuthParams.GetUrl: string; 77 | begin 78 | Result := FUrl; 79 | end; 80 | 81 | class function TOAuthParams.New: IParamsOAuth; 82 | begin 83 | Result := Self.Create; 84 | end; 85 | 86 | function TOAuthParams.SetClientID(const AValue: string): IParamsOAuth; 87 | begin 88 | Result := Self; 89 | FClientID := AValue; 90 | end; 91 | 92 | function TOAuthParams.SetClientSecret(const AValue: string): IParamsOAuth; 93 | begin 94 | Result := Self; 95 | FClientSecret := AValue; 96 | end; 97 | 98 | function TOAuthParams.SetLogin(const AValue: string): IParams; 99 | begin 100 | Result := Self; 101 | FLogin := AValue; 102 | end; 103 | 104 | function TOAuthParams.SetPassword(const AValue: string): IParams; 105 | begin 106 | Result := Self; 107 | FPassword := AValue; 108 | end; 109 | 110 | function TOAuthParams.SetSecretKey(const AValue: string): IParamsOAuth; 111 | begin 112 | Result := Self; 113 | FSecretKey := AValue; 114 | end; 115 | 116 | function TOAuthParams.SetUrl(const AValue: string): IParams; 117 | begin 118 | Result := Self; 119 | FUrl := AValue; 120 | end; 121 | 122 | end. 123 | -------------------------------------------------------------------------------- /Pessoa.pas: -------------------------------------------------------------------------------- 1 | unit Pessoa; 2 | 3 | interface 4 | 5 | uses 6 | Generics.Collections, 7 | Rest.Json; 8 | 9 | type 10 | TContatosDTO = class 11 | private 12 | FCodigo: Integer; 13 | FEmail: string; 14 | FNome: string; 15 | FTelefone: string; 16 | public 17 | property Codigo: Integer read FCodigo write FCodigo; 18 | property Email: string read FEmail write FEmail; 19 | property Nome: string read FNome write FNome; 20 | property Telefone: string read FTelefone write FTelefone; 21 | end; 22 | 23 | TEnderecoDTO = class 24 | private 25 | FBairro: string; 26 | FCep: string; 27 | FCidade: string; 28 | FEstado: string; 29 | FLogradouro: string; 30 | FNumero: string; 31 | public 32 | property Bairro: string read FBairro write FBairro; 33 | property Cep: string read FCep write FCep; 34 | property Cidade: string read FCidade write FCidade; 35 | property Estado: string read FEstado write FEstado; 36 | property Logradouro: string read FLogradouro write FLogradouro; 37 | property Numero: string read FNumero write FNumero; 38 | end; 39 | 40 | TPessoaDTO = class 41 | private 42 | FAtivo: Boolean; 43 | FCodigo: Integer; 44 | FContatos: TArray; 45 | FEndereco: TEnderecoDTO; 46 | FNome: string; 47 | public 48 | property Ativo: Boolean read FAtivo write FAtivo; 49 | property Codigo: Integer read FCodigo write FCodigo; 50 | property Contatos: TArray read FContatos write FContatos; 51 | property Endereco: TEnderecoDTO read FEndereco write FEndereco; 52 | property Nome: string read FNome write FNome; 53 | constructor Create; 54 | destructor Destroy; override; 55 | class function FromJsonString(const AValue: string): TPessoaDTO; static; 56 | function ToJsonString: string; 57 | 58 | end; 59 | 60 | TContent = class 61 | private 62 | FContent: TArray; 63 | public 64 | class function FromJsonString(const AValue: string): TContent; static; 65 | 66 | function ToJsonString: string; 67 | 68 | class function ToJsonList(const AVAlue: string): TList; 69 | 70 | property Content: TArray read FContent write FContent; 71 | 72 | 73 | destructor Destroy; override; 74 | end; 75 | 76 | implementation 77 | 78 | uses 79 | System.JSON; 80 | 81 | { TPessoaDTO } 82 | 83 | constructor TPessoaDTO.Create; 84 | begin 85 | inherited; 86 | FEndereco := TEnderecoDTO.Create; 87 | end; 88 | 89 | destructor TPessoaDTO.Destroy; 90 | var 91 | Element: TContatosDTO; 92 | begin 93 | FEndereco.Free; 94 | for Element in FContatos do 95 | Element.Free; 96 | inherited; 97 | end; 98 | 99 | class function TPessoaDTO.FromJsonString(const AValue: string): TPessoaDTO; 100 | begin 101 | Result := TJson.JsonToObject(AValue); 102 | end; 103 | 104 | function TPessoaDTO.ToJsonString: string; 105 | begin 106 | Result := TJson.ObjectToJsonString(self); 107 | end; 108 | 109 | { TRootDTO } 110 | 111 | destructor TContent.Destroy; 112 | var 113 | Element: TObject; 114 | begin 115 | for Element in FContent do 116 | Element.Free; 117 | inherited; 118 | end; 119 | 120 | 121 | class function TContent.ToJsonList(const AVAlue: string): TList; 122 | var 123 | Return: TJSONArray; 124 | begin 125 | Return := TJSONObject.ParseJSONValue(AVAlue) as TJSONArray; 126 | 127 | end; 128 | 129 | 130 | class function TContent.FromJsonString(const AValue: string): TContent; 131 | begin 132 | Result := TJson.JsonToObject(AValue); 133 | end; 134 | 135 | function TContent.ToJsonString: string; 136 | begin 137 | Result := TJson.ObjectToJsonString(self); 138 | end; 139 | 140 | end. 141 | -------------------------------------------------------------------------------- /Project1.dproj.local: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 2019/09/16 23:20:29.000.176,=C:\Users\Andre\Documents\Embarcadero\Studio\Projects\Unit1.pas 5 | 2020/03/06 20:14:11.000.158,=C:\Users\Andre\Documents\Embarcadero\Studio\Projects\Unit1.pas 6 | 2020/03/06 22:21:24.000.772,=C:\Users\Andre\Documents\Embarcadero\Studio\Projects\Unit1.pas 7 | 2020/03/11 20:43:47.000.127,=C:\Users\Andre\Documents\Embarcadero\Studio\Projects\Unit1.pas 8 | 2020/03/14 15:43:37.000.252,=C:\Users\Andre\Documents\Embarcadero\Studio\Projects\Unit1.pas 9 | 2020/03/14 15:44:00.000.639,C:\Users\Andre\Desktop\DelphiInga\uMain.pas=C:\Users\Andre\Documents\Embarcadero\Studio\Projects\Unit1.pas 10 | 2020/03/14 15:44:00.000.639,C:\Users\Andre\Desktop\DelphiInga\uMain.dfm=C:\Users\Andre\Documents\Embarcadero\Studio\Projects\Unit1.dfm 11 | 2020/03/14 15:44:03.000.310,C:\Users\Andre\Desktop\DelphiInga\Project1.dproj=C:\Users\Andre\Documents\Embarcadero\Studio\Projects\Project1.dproj 12 | 2020/03/14 16:59:46.000.469,=C:\Users\Andre\Desktop\DelphiInga\RootUnit.pas 13 | 2020/03/14 17:02:26.000.866,C:\Users\Andre\Desktop\DelphiInga\RootUnit.pas=C:\Users\Andre\Desktop\DelphiInga\Token.pas 14 | 2020/03/15 10:45:19.000.342,=C:\Users\Andre\Desktop\DelphiInga\Pessoa.pas 15 | 2020/03/16 22:06:09.000.802,=C:\Users\Andre\Desktop\DelphiInga\Unit1.pas 16 | 2020/03/16 22:06:31.000.704,C:\Users\Andre\Desktop\DelphiInga\interfaces\br.com.factorysolution.interfaces.pas=C:\Users\Andre\Desktop\DelphiInga\Unit1.pas 17 | 2020/03/16 22:18:57.000.792,=C:\Users\Andre\Desktop\DelphiInga\Unit1.pas 18 | 2020/03/16 22:19:21.000.737,C:\Users\Andre\Desktop\DelphiInga\basic\br.com.factorysolution.basic.pas=C:\Users\Andre\Desktop\DelphiInga\Unit1.pas 19 | 2020/03/16 22:23:32.000.811,C:\Users\Andre\Desktop\DelphiInga\basic\br.com.factorysolution.basicparams.pas=C:\Users\Andre\Desktop\DelphiInga\basic\br.com.factorysolution.basic.pas 20 | 2020/03/16 22:23:44.000.579,=C:\Users\Andre\Desktop\DelphiInga\Unit1.pas 21 | 2020/03/16 22:23:55.000.370,C:\Users\Andre\Desktop\DelphiInga\basic\br.com.factorysolution.basicrest.pas=C:\Users\Andre\Desktop\DelphiInga\Unit1.pas 22 | 2020/04/23 19:32:03.000.110,=C:\Users\Andre\Desktop\DelphiInga\Unit1.pas 23 | 2020/04/23 19:32:27.000.623,C:\Users\Andre\Desktop\DelphiInga\Unit1.pas=C:\Users\Andre\Desktop\DelphiInga\abstract\br.com.factorysolution.abstract.pas 24 | 2020/04/23 19:52:58.000.137,=C:\Users\Andre\Desktop\DelphiInga\Unit1.pas 25 | 2020/04/23 19:53:19.000.969,C:\Users\Andre\Desktop\DelphiInga\Unit1.pas=C:\Users\Andre\Desktop\DelphiInga\oauth\br.com.factorysolution.oauth.pas 26 | 2020/04/23 19:59:22.000.929,=C:\Users\Andre\Desktop\DelphiInga\Unit1.pas 27 | 2020/04/23 19:59:49.000.307,C:\Users\Andre\Desktop\DelphiInga\Unit1.pas=C:\Users\Andre\Desktop\DelphiInga\factory\br.com.factorysolution.factoryparams.pas 28 | 2020/04/23 20:34:25.000.529,=C:\Users\Andre\Desktop\DelphiInga\Unit1.pas 29 | 2020/04/23 20:34:36.000.717,C:\Users\Andre\Desktop\DelphiInga\Unit1.pas=C:\Users\Andre\Desktop\DelphiInga\oauth\br.com.factorysolution.oauthparams.pas 30 | 2020/04/23 20:58:50.000.359,C:\Users\Andre\Desktop\DelphiInga\factory\br.com.factorysolution.factoryparams.pas= 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /uMain.dfm: -------------------------------------------------------------------------------- 1 | object Form1: TForm1 2 | Left = 0 3 | Top = 0 4 | Caption = 'Form1' 5 | ClientHeight = 702 6 | ClientWidth = 852 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | OnCreate = FormCreate 15 | PixelsPerInch = 96 16 | TextHeight = 13 17 | object mmDados: TMemo 18 | Left = 351 19 | Top = 16 20 | Width = 493 21 | Height = 384 22 | ScrollBars = ssVertical 23 | TabOrder = 0 24 | end 25 | object grbBasic: TGroupBox 26 | Left = 8 27 | Top = 49 28 | Width = 337 29 | Height = 161 30 | Caption = 'Basic Auth ' 31 | TabOrder = 1 32 | object edtLogin: TLabeledEdit 33 | Left = 16 34 | Top = 36 35 | Width = 233 36 | Height = 21 37 | EditLabel.Width = 28 38 | EditLabel.Height = 13 39 | EditLabel.Caption = 'Login ' 40 | TabOrder = 0 41 | Text = 'admin@factorymoney.com' 42 | end 43 | object edtSenha: TLabeledEdit 44 | Left = 16 45 | Top = 83 46 | Width = 233 47 | Height = 21 48 | EditLabel.Width = 30 49 | EditLabel.Height = 13 50 | EditLabel.Caption = 'Senha' 51 | PasswordChar = '*' 52 | TabOrder = 1 53 | Text = 'admin' 54 | end 55 | object btnLogar: TButton 56 | Left = 16 57 | Top = 114 58 | Width = 75 59 | Height = 25 60 | Caption = 'Logar' 61 | TabOrder = 2 62 | end 63 | end 64 | object grbOauth: TGroupBox 65 | Left = 8 66 | Top = 216 67 | Width = 337 68 | Height = 457 69 | Caption = 'OAuth 2' 70 | Enabled = False 71 | TabOrder = 2 72 | object edtLoginOauth2: TLabeledEdit 73 | Left = 16 74 | Top = 36 75 | Width = 233 76 | Height = 21 77 | EditLabel.Width = 28 78 | EditLabel.Height = 13 79 | EditLabel.Caption = 'Login ' 80 | TabOrder = 0 81 | Text = 'admin@factorymoney.com' 82 | end 83 | object edtSenhaOauth2: TLabeledEdit 84 | Left = 16 85 | Top = 81 86 | Width = 233 87 | Height = 21 88 | EditLabel.Width = 30 89 | EditLabel.Height = 13 90 | EditLabel.Caption = 'Senha' 91 | PasswordChar = '*' 92 | TabOrder = 1 93 | Text = 'admin' 94 | end 95 | object BtnToken: TButton 96 | Left = 16 97 | Top = 195 98 | Width = 75 99 | Height = 25 100 | Caption = 'Get Token' 101 | TabOrder = 2 102 | OnClick = BtnTokenClick 103 | end 104 | object edtClientId: TLabeledEdit 105 | Left = 16 106 | Top = 125 107 | Width = 121 108 | Height = 21 109 | EditLabel.Width = 40 110 | EditLabel.Height = 13 111 | EditLabel.Caption = 'Client Id' 112 | TabOrder = 3 113 | Text = 'angular' 114 | end 115 | object edtSecretID: TLabeledEdit 116 | Left = 16 117 | Top = 168 118 | Width = 121 119 | Height = 21 120 | EditLabel.Width = 44 121 | EditLabel.Height = 13 122 | EditLabel.Caption = 'Secret Id' 123 | PasswordChar = '*' 124 | TabOrder = 4 125 | Text = '@ngul@r0' 126 | end 127 | object mmToken: TMemo 128 | Left = 2 129 | Top = 238 130 | Width = 333 131 | Height = 217 132 | Align = alBottom 133 | ScrollBars = ssVertical 134 | TabOrder = 5 135 | end 136 | end 137 | object btnGetAll: TButton 138 | Left = 351 139 | Top = 452 140 | Width = 75 141 | Height = 25 142 | Caption = 'Get All' 143 | TabOrder = 3 144 | OnClick = btnGetAllClick 145 | end 146 | object chkAutorizacao: TCheckBox 147 | Left = 10 148 | Top = 18 149 | Width = 97 150 | Height = 17 151 | Caption = 'OAuth 2' 152 | TabOrder = 4 153 | OnClick = chkAutorizacaoClick 154 | end 155 | object edtAuthorization: TLabeledEdit 156 | Left = 351 157 | Top = 425 158 | Width = 493 159 | Height = 21 160 | EditLabel.Width = 64 161 | EditLabel.Height = 13 162 | EditLabel.Caption = 'Authorization' 163 | TabOrder = 5 164 | end 165 | object btnGet: TButton 166 | Left = 351 167 | Top = 483 168 | Width = 75 169 | Height = 25 170 | Caption = 'Get' 171 | TabOrder = 6 172 | OnClick = btnGetClick 173 | end 174 | object btnPost: TButton 175 | Left = 351 176 | Top = 514 177 | Width = 75 178 | Height = 25 179 | Caption = 'Post' 180 | TabOrder = 7 181 | OnClick = btnPostClick 182 | end 183 | object btnPut: TButton 184 | Left = 351 185 | Top = 545 186 | Width = 75 187 | Height = 25 188 | Caption = 'Put' 189 | TabOrder = 8 190 | OnClick = btnPutClick 191 | end 192 | object Button1: TButton 193 | Left = 351 194 | Top = 576 195 | Width = 75 196 | Height = 25 197 | Caption = 'Delete' 198 | TabOrder = 9 199 | OnClick = Button1Click 200 | end 201 | end 202 | -------------------------------------------------------------------------------- /uMain.pas: -------------------------------------------------------------------------------- 1 | unit uMain; 2 | 3 | interface 4 | 5 | uses 6 | Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, 7 | Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls, 8 | JOSE.Core.JWT, 9 | JOSE.Core.JWS, 10 | JOSE.Core.JWK, 11 | JOSE.Core.JWA, 12 | JOSE.Types.JSON, 13 | JOSE.Core.Base, 14 | JOSE.Encoding.Base64, 15 | Pessoa, 16 | br.com.factorysolution.interfaces; 17 | 18 | type 19 | 20 | TForm1 = class(TForm) 21 | mmDados: TMemo; 22 | grbBasic: TGroupBox; 23 | edtLogin: TLabeledEdit; 24 | edtSenha: TLabeledEdit; 25 | btnLogar: TButton; 26 | grbOauth: TGroupBox; 27 | edtLoginOauth2: TLabeledEdit; 28 | edtSenhaOauth2: TLabeledEdit; 29 | BtnToken: TButton; 30 | edtClientId: TLabeledEdit; 31 | edtSecretID: TLabeledEdit; 32 | mmToken: TMemo; 33 | btnGetAll: TButton; 34 | chkAutorizacao: TCheckBox; 35 | edtAuthorization: TLabeledEdit; 36 | btnGet: TButton; 37 | btnPost: TButton; 38 | btnPut: TButton; 39 | Button1: TButton; 40 | procedure BtnTokenClick(Sender: TObject); 41 | procedure FormCreate(Sender: TObject); 42 | procedure btnGetAllClick(Sender: TObject); 43 | procedure chkAutorizacaoClick(Sender: TObject); 44 | procedure btnGetClick(Sender: TObject); 45 | procedure btnPostClick(Sender: TObject); 46 | procedure btnPutClick(Sender: TObject); 47 | procedure Button1Click(Sender: TObject); 48 | private 49 | { Private declarations } 50 | FToken: string; 51 | function GetUrl: string; 52 | procedure GetOne; 53 | procedure Post; 54 | procedure Put; 55 | procedure Delete; 56 | procedure GetAll; 57 | procedure printPerson(const APerson: TPessoaDTO); 58 | function GetParams: IParams; 59 | public 60 | { Public declarations } 61 | end; 62 | 63 | var 64 | Form1: TForm1; 65 | 66 | 67 | implementation 68 | 69 | uses 70 | System.DateUtils, 71 | Token, 72 | br.com.factorysolution.basicrest, 73 | br.com.factorysolution.basicparams, 74 | br.com.factorysolution.oauthparams, 75 | System.StrUtils, 76 | br.com.factorysolution.oauth; 77 | 78 | 79 | const 80 | cUrlBasic = 'http://localhost:8090/%s'; 81 | cUrlOAuth = 'http://localhost:8091/%s'; 82 | cSecretKey = 'factory'; 83 | 84 | {$R *.dfm} 85 | 86 | function TForm1.GetParams: IParams; 87 | begin 88 | if chkAutorizacao.Checked then 89 | Result := TOAuthParams 90 | .New 91 | .SetClientID(edtClientId.Text) 92 | .SetClientSecret(edtSecretID.Text) 93 | .SetSecretKey(cSecretKey) 94 | .SetLogin(edtLoginOauth2.Text) 95 | .SetPassword(edtSenhaOauth2.Text) 96 | .SetUrl(GetUrl) 97 | 98 | else 99 | Result := TBaseParams 100 | .New 101 | .SetLogin(edtLogin.Text) 102 | .SetPassword(edtSenha.Text) 103 | .SetUrl(GetUrl); 104 | end; 105 | 106 | procedure TForm1.btnGetAllClick(Sender: TObject); 107 | begin 108 | GetAll; 109 | end; 110 | 111 | procedure TForm1.GetAll; 112 | var 113 | Params: IParams; 114 | Content: TContent; 115 | begin 116 | Params := GetParams; 117 | if chkAutorizacao.Checked then 118 | Content := TOAuthRest.New(Params, FToken).Get('pessoas') 119 | else 120 | Content := TBasicRest.New(params).Get('pessoas'); 121 | 122 | mmDados.Lines.Clear; 123 | 124 | mmDados.Lines.Add(Content.ToJsonString); 125 | 126 | if Assigned(Content) then Content.Free; 127 | end; 128 | 129 | function TForm1.GetUrl: string; 130 | begin 131 | Result := ifthen(chkAutorizacao.Checked, cUrlOAuth, cUrlBasic); 132 | end; 133 | 134 | procedure TForm1.GetOne; 135 | var 136 | Params: IParams; 137 | Person: TPessoaDTO; 138 | ID: string; 139 | begin 140 | ID := InputBox('Informe o id da pessoa', '', ''); 141 | Person := nil; 142 | if not Id.Trim.IsEmpty then 143 | begin 144 | Params := GetParams; 145 | if chkAutorizacao.Checked then 146 | Person := TOAuthRest.New(Params, FToken).Get('pessoas',ID) 147 | else 148 | Person := TBasicRest.New(params).Get('pessoas',ID); 149 | printPerson(Person); 150 | end; 151 | if Assigned(Person) then Person.Free; 152 | end; 153 | 154 | procedure TForm1.printPerson(const APerson: TPessoaDTO); 155 | var 156 | Contato: TContatosDTO; 157 | begin 158 | mmDados.Lines.Clear; 159 | 160 | with APerson, mmDados.Lines do 161 | begin 162 | Add('ID: ' + Codigo.ToString); 163 | Add('Name: ' + Nome); 164 | Add('Endereco '); 165 | Add(' Cidade: ' + Endereco.Cidade); 166 | Add(' Estado: ' + Endereco.Estado); 167 | Add(' Logr.: ' + Endereco.Logradouro); 168 | Add(' '); 169 | Add('Contatos [ '); 170 | for Contato in Contatos do 171 | begin 172 | Add(' Nome: ' + Contato.Nome); 173 | Add(' Telefone: ' + Contato.Telefone); 174 | end; 175 | Add(' ] '); 176 | 177 | end; 178 | end; 179 | 180 | procedure TForm1.btnGetClick(Sender: TObject); 181 | begin 182 | GetOne; 183 | end; 184 | 185 | procedure TForm1.Post; 186 | var 187 | Person: TPessoaDTO; 188 | 189 | function CreatePerson: TPessoaDTO; 190 | var 191 | LContato: TContatosDTO; 192 | LContatos: TArray; 193 | begin 194 | Result := TPessoaDTO.Create; 195 | LContato := TContatosDTO.Create; 196 | with Result do 197 | begin 198 | Nome := 'Andre Oliveira _'; 199 | Ativo := True; 200 | with Endereco do 201 | begin 202 | Bairro := 'Centro'; 203 | Cep := '87070-000'; 204 | Cidade := 'Maringa'; 205 | Estado := 'PR'; 206 | Logradouro := 'Rua XPTO'; 207 | Numero := '123'; 208 | end; 209 | 210 | with LContato do 211 | begin 212 | Email := 'andre.oliveiras@tecnospeed.com.br'; 213 | Telefone := '123456789'; 214 | Nome := 'Patroa'; 215 | end; 216 | LContatos := TArray.Create(LContato); 217 | Contatos := LContatos; 218 | end; 219 | end; 220 | begin 221 | Person := CreatePerson; 222 | if chkAutorizacao.Checked then 223 | Person := TOAuthRest.New(GetParams, FToken).Post('pessoas',Person) 224 | else 225 | Person := TBasicRest.New(GetParams).Post('pessoas',Person); 226 | 227 | printPerson(Person); 228 | 229 | if Assigned(Person) then Person.Free; 230 | 231 | end; 232 | 233 | procedure TForm1.Put; 234 | var 235 | ID: string; 236 | Person, Temp : TPessoaDTO; 237 | 238 | function GetPerson: TPessoaDTO; 239 | begin 240 | ID := InputBox('Informe o id da pessoa', '', ''); 241 | if not Id.Trim.IsEmpty then 242 | begin 243 | if chkAutorizacao.Checked then 244 | Result := TOAuthRest.New(GetParams, FToken).Get('pessoas',ID) 245 | else 246 | Result := TBasicRest.New(GetParams).Get('pessoas',ID); 247 | end; 248 | end; 249 | 250 | begin 251 | Temp := GetPerson; 252 | Temp.Nome := Temp.Nome + '_update'; 253 | if chkAutorizacao.Checked then 254 | Person := TOAuthRest.New(GetParams, FToken).Put(Format('pessoas/%s', [ID]), Temp) 255 | else 256 | Person := TBasicRest.New(GetParams).Put(Format('pessoas/%s', [ID]),Temp); 257 | printPerson(Person); 258 | 259 | if Assigned(Person) then Person.Free; 260 | if Assigned(Temp) then Temp.Free; 261 | 262 | end; 263 | 264 | procedure TForm1.btnPostClick(Sender: TObject); 265 | begin 266 | Post; 267 | end; 268 | 269 | procedure TForm1.btnPutClick(Sender: TObject); 270 | begin 271 | Put; 272 | end; 273 | 274 | procedure TForm1.BtnTokenClick(Sender: TObject); 275 | var 276 | LRestOAuth : IRestOAuth; 277 | 278 | procedure LoadJWT(const AToken: TToken); 279 | var 280 | _date: TDateTime; 281 | Authoritie, _Scope: string; 282 | begin 283 | with AToken do 284 | begin 285 | with mmDados.Lines do 286 | begin 287 | Add('User Name: ' + User_Name); 288 | Add('Name: ' + Nome); 289 | Add('Client Id: ' + Client_Id); 290 | _date := IncHour(UnixToDateTime(Exp), -3); 291 | Add('Expiration: ' + MinutesBetween(_date, Now).ToString + ' minutes'); 292 | Add('Authorities : [ '); 293 | for Authoritie in authorities do 294 | begin 295 | Add(' ' + Authoritie); 296 | end; 297 | Add(']'); 298 | Add('Scope: [ ') ; 299 | for _Scope in Scope do 300 | begin 301 | Add(' ' + _Scope); 302 | end; 303 | Add(']'); 304 | end; 305 | Free; 306 | end; 307 | end; 308 | begin 309 | LRestOAuth := TOAuthRest.New(GetParams); 310 | FToken := LRestOAuth.GetToken; 311 | edtAuthorization.Text := 'Bearer ' + FToken; 312 | LoadJWT(LRestOAuth.ValidateToken(FToken)); 313 | end; 314 | 315 | procedure TForm1.Button1Click(Sender: TObject); 316 | begin 317 | Delete; 318 | end; 319 | 320 | procedure TForm1.Delete; 321 | var 322 | ID: string; 323 | begin 324 | ID := InputBox('Informe o id da pessoa', '', ''); 325 | if not ID.Trim.IsEmpty then 326 | begin 327 | if chkAutorizacao.Checked then 328 | TOAuthRest.New(GetParams, FToken).Delete('pessoas', ID.ToInteger) //TBasicRest.New(params).Get('pessoas',ID); 329 | else 330 | TBasicRest.New(GetParams).Delete('pessoas', ID.ToInteger); 331 | end; 332 | end; 333 | 334 | procedure TForm1.chkAutorizacaoClick(Sender: TObject); 335 | begin 336 | grbOauth.Enabled := chkAutorizacao.Checked; 337 | grbBasic.Enabled := not grbOauth.Enabled; 338 | 339 | end; 340 | 341 | procedure TForm1.FormCreate(Sender: TObject); 342 | begin 343 | chkAutorizacaoClick(sender); 344 | end; 345 | 346 | end. 347 | -------------------------------------------------------------------------------- /Project1.dproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | {2D3C39F8-168A-4EA1-A38B-515F5E1CFD3D} 4 | 18.7 5 | VCL 6 | Project1.dpr 7 | True 8 | Debug 9 | Win32 10 | 1 11 | Application 12 | 13 | 14 | true 15 | 16 | 17 | true 18 | Base 19 | true 20 | 21 | 22 | true 23 | Base 24 | true 25 | 26 | 27 | true 28 | Base 29 | true 30 | 31 | 32 | true 33 | Cfg_1 34 | true 35 | true 36 | 37 | 38 | true 39 | Base 40 | true 41 | 42 | 43 | true 44 | Cfg_2 45 | true 46 | true 47 | 48 | 49 | .\$(Platform)\$(Config) 50 | .\$(Platform)\$(Config) 51 | false 52 | false 53 | false 54 | false 55 | false 56 | System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace) 57 | $(BDS)\bin\delphi_PROJECTICON.ico 58 | $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png 59 | $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png 60 | Project1 61 | 62 | 63 | DBXSqliteDriver;RESTComponents;DBXInterBaseDriver;vclactnband;vclFireDAC;dacfmx260;ACBr_SATWS;tethering;svnui;FireDACADSDriver;frxFD26;ORMBrDriversLinks;ORMBrCore;ACBr_MDFeDamdfeRL;vcltouch;ACBr_NFe;ACBr_NFeDanfeFR;vcldb;bindcompfmx;svn;ACBrDFeReportRL;inetdb;ACBr_NFeDanfeESCPOS;ACBr_Diversos;ACBr_TXTComum;FmxTeeUI;fmx;FireDACIBDriver;fmxdae;vquery260;ACBr_CTeDacteFR;frxTee26;dacvcl260;fs26;dbexpress;IndyCore;ACBr_NFSeDanfseFR;vclx;dsnap;unidac260;FireDACCommon;ACBr_SATExtratoRL;ACBr_PCNComum;DBEBrConnectionDBExpress;RESTBackendComponents;ACBR_DeSTDA;VCLRESTComponents;soapserver;ACBr_SAT;fsTee26;vclie;bindengine;DBXMySQLDriver;CloudService;FireDACMySQLDriver;ACBr_SATECFVirtual;frx26;ACBr_Sintegra;FireDACCommonODBC;FireDACCommonDriver;inet;IndyIPCommon;bindcompdbx;ACBr_TCP;ACBr_CTeDacteRL;vcl;IndyIPServer;ACBr_CTe;ACBr_SATExtratoESCPOS;frxDB26;IndySystem;DBEBrCore;frxDBX26;ACBr_NFeDanfeRL;dsnapcon;FireDACMSAccDriver;fmxFireDAC;ORMBrManagerObjectSet;vclimg;fsDB26;TeeDB;FireDAC;unidacvcl260;ACBr_SPED;ACBr_SPEDImportar;ACBr_MDFe;frxe26;ACBr_BoletoRL;FireDACSqliteDriver;FireDACPgDriver;ACBr_LFD;FMXTee;crcontrols260;soaprtl;DbxCommonDriver;ACBr_NFSeDanfseRL;Tee;xmlrtl;soapmidas;fmxobj;vclwinx;dac260;rtl;ACBr_OpenSSL;DbxClientDriver;ACBr_DFeComum;CustomIPTransport;vcldsnap;ORMBrManagerClientDataSet;ACBr_Convenio115;bindcomp;appanalytics;ORMBrManagerFDMemTable;ACBr_Serial;IndyIPClient;DBEBrConnectionFireDAC;frce;bindcompvcl;ORMBrLibrary;TMSCryptoPkgDXE12;TeeUI;ACBr_BlocoX;dbxcds;VclSmp;ACBr_NFCeECFVirtual;adortl;ACBr_BoletoFR;unidacfmx260;ACBr_Boleto;dsnapxml;ACBr_SEF2;dbrtl;IndyProtocols;inetdbxpress;TMSCryptoPkgDEDXE12;ACBr_MDFeDamdfeFR;ACBr_NFSe;fmxase;$(DCC_UsePackage) 64 | Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) 65 | Debug 66 | true 67 | CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments= 68 | 1033 69 | $(BDS)\bin\default_app.manifest 70 | 71 | 72 | DBXSqliteDriver;RESTComponents;DBXInterBaseDriver;vclactnband;vclFireDAC;tethering;FireDACADSDriver;vcltouch;vcldb;bindcompfmx;inetdb;FmxTeeUI;fmx;FireDACIBDriver;fmxdae;dbexpress;IndyCore;vclx;dsnap;FireDACCommon;RESTBackendComponents;VCLRESTComponents;soapserver;vclie;bindengine;DBXMySQLDriver;CloudService;FireDACMySQLDriver;FireDACCommonODBC;FireDACCommonDriver;inet;IndyIPCommon;bindcompdbx;vcl;IndyIPServer;IndySystem;dsnapcon;FireDACMSAccDriver;fmxFireDAC;vclimg;TeeDB;FireDAC;FireDACSqliteDriver;FireDACPgDriver;FMXTee;soaprtl;DbxCommonDriver;Tee;xmlrtl;soapmidas;fmxobj;vclwinx;rtl;DbxClientDriver;CustomIPTransport;vcldsnap;bindcomp;appanalytics;IndyIPClient;bindcompvcl;TMSCryptoPkgDXE12;TeeUI;dbxcds;VclSmp;adortl;dsnapxml;dbrtl;IndyProtocols;inetdbxpress;fmxase;$(DCC_UsePackage) 73 | 74 | 75 | DEBUG;$(DCC_Define) 76 | true 77 | false 78 | true 79 | true 80 | true 81 | 82 | 83 | false 84 | true 85 | PerMonitorV2 86 | E:\Componente\delphi-jose-jwt\Source\Common;E:\Componente\delphi-jose-jwt\Source\JOSE;E:\Componente\delphi-jose-jwt\Source;$(DCC_UnitSearchPath) 87 | true 88 | 1033 89 | 90 | 91 | false 92 | RELEASE;$(DCC_Define) 93 | 0 94 | 0 95 | 96 | 97 | true 98 | PerMonitorV2 99 | 100 | 101 | 102 | MainSource 103 | 104 | 105 |
Form1
106 | dfm 107 |
108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | Cfg_2 118 | Base 119 | 120 | 121 | Base 122 | 123 | 124 | Cfg_1 125 | Base 126 | 127 |
128 | 129 | Delphi.Personality.12 130 | Application 131 | 132 | 133 | 134 | Project1.dpr 135 | 136 | 137 | ACBr - OpenSSL através do LibXMLSec - (http://www.projetoacbr.com.br/) 138 | ACBr - Calculadora, Extenso, Validador, Troco, CMC7, Fala, BarCode, EnterTab, GIF, QrCode, InStore, CargaBal - (http://www.projetoacbr.com.br/) 139 | ACBr - Socket, CEP, TCP, IBGE, CNIEE, Suframa, Download, FTP, HTTP, NFPws, IBPTax, CNPJ, CPF, Cotação, E-mail, Feriado - (http://www.projectoacbr.com.br/) 140 | Microsoft Office 2000 Sample Automation Server Wrapper Components 141 | Microsoft Office XP Sample Automation Server Wrapper Components 142 | DBEnginesBr - UniDAC 143 | ACBr - Biblioteca Comum, EAD, AAC - (http://www.projetoacbr.com.br/) 144 | ACBr - Integrador - (http://www.projetoacbr.com.br/) 145 | 146 | 147 | 148 | 149 | 150 | Project1.exe 151 | true 152 | 153 | 154 | 155 | 156 | 1 157 | 158 | 159 | Contents\MacOS 160 | 1 161 | 162 | 163 | 0 164 | 165 | 166 | 167 | 168 | classes 169 | 1 170 | 171 | 172 | 173 | 174 | res\xml 175 | 1 176 | 177 | 178 | 179 | 180 | library\lib\armeabi-v7a 181 | 1 182 | 183 | 184 | 185 | 186 | library\lib\armeabi 187 | 1 188 | 189 | 190 | 191 | 192 | library\lib\mips 193 | 1 194 | 195 | 196 | 197 | 198 | library\lib\armeabi-v7a 199 | 1 200 | 201 | 202 | 203 | 204 | res\drawable 205 | 1 206 | 207 | 208 | 209 | 210 | res\values 211 | 1 212 | 213 | 214 | 215 | 216 | res\values-v21 217 | 1 218 | 219 | 220 | 221 | 222 | res\values 223 | 1 224 | 225 | 226 | 227 | 228 | res\drawable 229 | 1 230 | 231 | 232 | 233 | 234 | res\drawable-xxhdpi 235 | 1 236 | 237 | 238 | 239 | 240 | res\drawable-ldpi 241 | 1 242 | 243 | 244 | 245 | 246 | res\drawable-mdpi 247 | 1 248 | 249 | 250 | 251 | 252 | res\drawable-hdpi 253 | 1 254 | 255 | 256 | 257 | 258 | res\drawable-xhdpi 259 | 1 260 | 261 | 262 | 263 | 264 | res\drawable-mdpi 265 | 1 266 | 267 | 268 | 269 | 270 | res\drawable-hdpi 271 | 1 272 | 273 | 274 | 275 | 276 | res\drawable-xhdpi 277 | 1 278 | 279 | 280 | 281 | 282 | res\drawable-xxhdpi 283 | 1 284 | 285 | 286 | 287 | 288 | res\drawable-xxxhdpi 289 | 1 290 | 291 | 292 | 293 | 294 | res\drawable-small 295 | 1 296 | 297 | 298 | 299 | 300 | res\drawable-normal 301 | 1 302 | 303 | 304 | 305 | 306 | res\drawable-large 307 | 1 308 | 309 | 310 | 311 | 312 | res\drawable-xlarge 313 | 1 314 | 315 | 316 | 317 | 318 | res\values 319 | 1 320 | 321 | 322 | 323 | 324 | 1 325 | 326 | 327 | Contents\MacOS 328 | 1 329 | 330 | 331 | 0 332 | 333 | 334 | 335 | 336 | Contents\MacOS 337 | 1 338 | .framework 339 | 340 | 341 | Contents\MacOS 342 | 1 343 | .framework 344 | 345 | 346 | 0 347 | 348 | 349 | 350 | 351 | 1 352 | .dylib 353 | 354 | 355 | 1 356 | .dylib 357 | 358 | 359 | 1 360 | .dylib 361 | 362 | 363 | Contents\MacOS 364 | 1 365 | .dylib 366 | 367 | 368 | Contents\MacOS 369 | 1 370 | .dylib 371 | 372 | 373 | 0 374 | .dll;.bpl 375 | 376 | 377 | 378 | 379 | 1 380 | .dylib 381 | 382 | 383 | 1 384 | .dylib 385 | 386 | 387 | 1 388 | .dylib 389 | 390 | 391 | Contents\MacOS 392 | 1 393 | .dylib 394 | 395 | 396 | Contents\MacOS 397 | 1 398 | .dylib 399 | 400 | 401 | 0 402 | .bpl 403 | 404 | 405 | 406 | 407 | 0 408 | 409 | 410 | 0 411 | 412 | 413 | 0 414 | 415 | 416 | 0 417 | 418 | 419 | Contents\Resources\StartUp\ 420 | 0 421 | 422 | 423 | Contents\Resources\StartUp\ 424 | 0 425 | 426 | 427 | 0 428 | 429 | 430 | 431 | 432 | 1 433 | 434 | 435 | 1 436 | 437 | 438 | 1 439 | 440 | 441 | 442 | 443 | 1 444 | 445 | 446 | 1 447 | 448 | 449 | 1 450 | 451 | 452 | 453 | 454 | 1 455 | 456 | 457 | 1 458 | 459 | 460 | 1 461 | 462 | 463 | 464 | 465 | 1 466 | 467 | 468 | 1 469 | 470 | 471 | 1 472 | 473 | 474 | 475 | 476 | 1 477 | 478 | 479 | 1 480 | 481 | 482 | 1 483 | 484 | 485 | 486 | 487 | 1 488 | 489 | 490 | 1 491 | 492 | 493 | 1 494 | 495 | 496 | 497 | 498 | 1 499 | 500 | 501 | 1 502 | 503 | 504 | 1 505 | 506 | 507 | 508 | 509 | 1 510 | 511 | 512 | 1 513 | 514 | 515 | 1 516 | 517 | 518 | 519 | 520 | 1 521 | 522 | 523 | 1 524 | 525 | 526 | 1 527 | 528 | 529 | 530 | 531 | 1 532 | 533 | 534 | 1 535 | 536 | 537 | 1 538 | 539 | 540 | 541 | 542 | 1 543 | 544 | 545 | 1 546 | 547 | 548 | 1 549 | 550 | 551 | 552 | 553 | 1 554 | 555 | 556 | 1 557 | 558 | 559 | 1 560 | 561 | 562 | 563 | 564 | 1 565 | 566 | 567 | 1 568 | 569 | 570 | 1 571 | 572 | 573 | 574 | 575 | 1 576 | 577 | 578 | 1 579 | 580 | 581 | 1 582 | 583 | 584 | 585 | 586 | 1 587 | 588 | 589 | 1 590 | 591 | 592 | 1 593 | 594 | 595 | 596 | 597 | 1 598 | 599 | 600 | 1 601 | 602 | 603 | 1 604 | 605 | 606 | 607 | 608 | 1 609 | 610 | 611 | 1 612 | 613 | 614 | 1 615 | 616 | 617 | 618 | 619 | 1 620 | 621 | 622 | 1 623 | 624 | 625 | 1 626 | 627 | 628 | 629 | 630 | 1 631 | 632 | 633 | 1 634 | 635 | 636 | 1 637 | 638 | 639 | 640 | 641 | 1 642 | 643 | 644 | 1 645 | 646 | 647 | 1 648 | 649 | 650 | 651 | 652 | 1 653 | 654 | 655 | 1 656 | 657 | 658 | 1 659 | 660 | 661 | 662 | 663 | 1 664 | 665 | 666 | 1 667 | 668 | 669 | 1 670 | 671 | 672 | 673 | 674 | 1 675 | 676 | 677 | 1 678 | 679 | 680 | 1 681 | 682 | 683 | 684 | 685 | 1 686 | 687 | 688 | 1 689 | 690 | 691 | 1 692 | 693 | 694 | 695 | 696 | 1 697 | 698 | 699 | 700 | 701 | ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF 702 | 1 703 | 704 | 705 | ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF 706 | 1 707 | 708 | 709 | 710 | 711 | 1 712 | 713 | 714 | 1 715 | 716 | 717 | 718 | 719 | ..\ 720 | 1 721 | 722 | 723 | ..\ 724 | 1 725 | 726 | 727 | 728 | 729 | 1 730 | 731 | 732 | 1 733 | 734 | 735 | 1 736 | 737 | 738 | 739 | 740 | 1 741 | 742 | 743 | 1 744 | 745 | 746 | 1 747 | 748 | 749 | 750 | 751 | ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF 752 | 1 753 | 754 | 755 | 756 | 757 | ..\ 758 | 1 759 | 760 | 761 | ..\ 762 | 1 763 | 764 | 765 | 766 | 767 | Contents 768 | 1 769 | 770 | 771 | Contents 772 | 1 773 | 774 | 775 | 776 | 777 | Contents\Resources 778 | 1 779 | 780 | 781 | Contents\Resources 782 | 1 783 | 784 | 785 | 786 | 787 | library\lib\armeabi-v7a 788 | 1 789 | 790 | 791 | 1 792 | 793 | 794 | 1 795 | 796 | 797 | 1 798 | 799 | 800 | 1 801 | 802 | 803 | Contents\MacOS 804 | 1 805 | 806 | 807 | Contents\MacOS 808 | 1 809 | 810 | 811 | 0 812 | 813 | 814 | 815 | 816 | 1 817 | 818 | 819 | 1 820 | 821 | 822 | 823 | 824 | Assets 825 | 1 826 | 827 | 828 | Assets 829 | 1 830 | 831 | 832 | 833 | 834 | Assets 835 | 1 836 | 837 | 838 | Assets 839 | 1 840 | 841 | 842 | 843 | 844 | 845 | 846 | 847 | 848 | 849 | 850 | 851 | 852 | 853 | True 854 | False 855 | 856 | 857 | 12 858 | 859 | 860 | 861 | 862 |
863 | --------------------------------------------------------------------------------