UNPKG

angular2-devise-token-auth

Version:

Helper library for working with Devise Token Auth in your Angular 2 applications

26 lines (24 loc) 642 B
export class AuthConfig { accessToken:string; tokenType:string; client:string; expiry:string; uid:string; authHeaders:Array<string>; globalHeaders:Array<Object>; constructor(config:any = {}) { this.accessToken = config.accessToken || 'access-token'; this.tokenType = config.tokenType || 'token-type'; this.client = config.client || 'client'; this.expiry = config.expiry || 'expiry'; this.uid = config.uid || 'uid'; this.globalHeaders = config.globalHeaders || []; this.authHeaders = [ this.tokenType, this.accessToken, this.client, this.expiry, this.uid ]; } }