
declare class AuthenticationManager extends NSObject {

	static alloc(): AuthenticationManager; // inherited from NSObject

	static new(): AuthenticationManager; // inherited from NSObject

	static sharedInstance(): AuthenticationManager;

	readonly access_token: string;

	readonly addGroupIdentifier: string;

	authorizedAppVersion: string;

	clientId: string;

	client_secret: string;

	debug: boolean;

	delegate: AuthenticationManagerDelegate;

	readonly expires_in: number;

	readonly id_token: string;

	issuer: string;

	persistentSessionStoring: boolean;

	presentingController: UIViewController;

	privateModeAuthentication: boolean;

	redirecURL: string;

	refreshTokenAutomatically: boolean;

	readonly refresh_token: string;

	scopes: NSArray<any>;

	tenant: string;

	useDeviceSafariToAuthenticate: boolean;

	configureAuthenticationManagerWithHostUrlScopesClientIdClientSecretRedirectUrlTenant(strASHostUrl: string, arrScopes: NSArray<any> | any[], strClientId: string, clientSecret: string, urlString: string, tenant: string): void;

	handleOpenURL(url: NSURL): void;

	initiateAuthentication(): void;

	isAuthenticated(): boolean;

	logoutFromCurrentSession(): void;

	logoutFromSessionWithRefreshToken(refresh_token: string): void;

	requestForNewTokenFromRefreshToken(): void;

	requestForNewTokenFromRefreshTokenWithSuccessBlockWithFailBlock(successBlock: (p1: AuthenticationManager) => void, failBlock: (p1: NSError) => void): void;

	setAuthorizationServerEndPoints(endpoints: NSDictionary<any, any>): void;
}

interface AuthenticationManagerDelegate extends NSObjectProtocol {

	didAuthenticationCancelled?(): void;

	didAuthenticationCompletedWithProperties(authenticationManager: AuthenticationManager, properties: NSDictionary<any, any>): void;

	didAuthenticationManagerFailedWithError(error: NSError): void;

	didRefreshTokenRequestCompletedWithProperties?(authenticationManager: AuthenticationManager, properties: NSDictionary<any, any>): void;

	didSessionLoggedOut?(): void;

	secureSessionFailedWithError?(error: NSError): void;
}
declare var AuthenticationManagerDelegate: {

	prototype: AuthenticationManagerDelegate;
};

declare var INFOR_OAUTH_AS_AUTH_ENDPOINT: string;

declare var INFOR_OAUTH_AS_REVOKE_ENDPOINT: string;

declare var INFOR_OAUTH_AS_TOKEN_ENDPOINT: string;

declare var InforAuthenticationVersionNumber: number;

declare var InforAuthenticationVersionString: interop.Reference<number>;

declare const enum OAuthErrorCode {

	UserDeclinedAccess = -10001,

	NoCallbackFromAuthServer = -10002,

	InvalidAuthServerURL = -10003,

	TokenRevoked = -10004,

	TokenNotAuthorized = -10005,

	InvalidClient = -10006,

	TokenRevokeFailed = -10007,

	NoUserSession = -10008,

	NoRefreshTokenProvided = -10009
}

declare const enum SSODataAvailability {

	Undefined = 0,

	Found = 1,

	NotFound = -1,

	FoundWithDifferentTenant = 2
}

declare class SSODataManager extends NSObject {

	static alloc(): SSODataManager; // inherited from NSObject

	static new(): SSODataManager; // inherited from NSObject

	static sharedInstance(): SSODataManager;

	readonly keyChainAccessGroup: string;

	constructor(o: { keyChainAccessGroup: string; });

	addUserDataForServerTenantUserNameDisplayPictureDataWithSuccessBlockFailBlock(environmentVariable: string, tenant: string, username: string, userDisplayPictureData: NSData, successBlock: (p1: string) => void, failBlock: (p1: NSError) => void): void;

	checkUserDataAvailabilityForServerTenant(environmentVariable: string, tenant: string): SSODataAvailability;

	configureWithKeyChainAccessGroup(keyChainAccessGroup: string): void;

	getUserDetailsForServerWithSuccessBlockWithFailBlock(environmentVariable: string, successBlock: (p1: string, p2: NSData) => void, failBlock: (p1: NSError) => void): void;

	initWithKeyChainAccessGroup(keyChainAccessGroup: string): this;

	isConfiguredWithAccessgroup(): boolean;

	removeUserDataForServerSuccessBlockFailBlock(environmentVariable: string, successBlock: () => void, failBlock: (p1: NSError) => void): void;

	updateUserDataForServerUserNameDisplayPictureDataWithSuccessBlockFailBlock(environmentVariable: string, username: string, userDisplayPictureData: NSData, successBlock: (p1: string) => void, failBlock: (p1: NSError) => void): void;
}

declare const enum SSODataManagerErrorCode {

	InvalidData = -20001,

	NoChangeInData = -20002,

	UpdateFailed = -20003,

	InvalidInitialization = -20004,

	UnableToFetch = -20005,

	SameServerDifferentTenant = -20006,

	DeleteFailed = -20007
}
