public void refreshAppAuthTicket ( ) { StringBuilder resourceUrl = new StringBuilder ( MozuConfig . getBaseUrl ( ) ) . append ( AuthTicketUrl . refreshAppAuthTicketUrl ( null ) . getUrl ( ) ) ; try { @ SuppressWarnings ( "unchecked" ) MozuClient < AuthTicket > client = ( MozuClient < AuthTicket > ) MozuClientFactory . getInstance ( AuthTicket . class ) ; AuthTicketRequest authTicketRequest = new AuthTicketRequest ( ) ; authTicketRequest . setRefreshToken ( appAuthTicket . getRefreshToken ( ) ) ; appAuthTicket = client . executePutRequest ( authTicketRequest , resourceUrl . toString ( ) , null ) ; } catch ( ApiException e ) { logger . warn ( e . getMessage ( ) , e ) ; throw e ; } catch ( Exception e ) { logger . warn ( e . getMessage ( ) , e ) ; throw new ApiException ( "Exception getting Mozu client: " + e . getMessage ( ) ) ; } logger . info ( "Setting app token refresh intervals" ) ; setRefreshIntervals ( false ) ; logger . info ( "App Authentication Done" ) ; }
jh the application auth ticket using the refresh token